// See https://aka.ms/new-console-template for more information
using Bread.IoC;

Console.WriteLine("Hello, World!");

public class  TestModel
{
    public string Config { get; set; } = string.Empty;
    public TestModel(string config)
    {
        Config = config;
    }
}

public class TestContrller : Controller
{
    TestModel _model;
    public TestContrller(TestModel model)
    {
        _model = model;
        Console.WriteLine($"TestContrller created with config: {model.Config}");
    }
}


public partial class TestContainer : Bread.IoC.IoCContainer
{
    TestModel _model;
    public TestContainer(string config) : base()
    {
        _model = new TestModel(config);
    }

    protected override void Bootstrap(Bread.IoC.IBootstrapper ioc)
    {
        ioc.Regist<TestModel>(_model);
        ioc.Regist<TestContrller>();
    }
}